﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace map.manage
{
    public partial class configshop_intro : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                cbuser u = cbuser.getcuruser();
                string id = u.cbuserid.ToString();
                cbshopcss sc = cbshopcss.findorcreate(id);
                string css = sc.getstylestring();
                Literalcss.Text = css;

                //cbshoppageelement spe = cbshoppageelement.findorcreatesystem(id,
                //"网站导航栏");
                //Literal1.Text = spe.gethtml0(0);
                cbuser u1 = cbuser.Find(" cbuserid = '" + id + "' ");
                Label_nick.Text = u1.cbusernickname.ToString();
                Label_area.Text = u1.省编码.ToString();
                Label_good.Text = u1.pingjia_good.ToString();
                Label_bad.Text = u1.pingjia_bad.ToString();
                Literal_chat.Text = cbuser.getChatStrfromuserid(id);
                cbBroker b = cbBroker.Find(" ShopOwnerID = '"+id
                    +"' and StartDate <= '"+DateTime.Today.ToShortDateString()+"'"
                    //+"  and EndDate >= '"+DateTime.Today.ToShortDateString()+"'"
                    );
                if (b.Count > 0)
                {
                    Literal_jjr.Text = cbuser.getChatStrfromuserid(b.BrokerID.ToString());
                }
            }
        }
    }
}
